﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Listejoueurs : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Params["equipe"] == "yes"){
            GridView2.Visible = false;
            GridView1.Visible = true;
            GridView1.DataSource = JoueurDAO.retournerListeJoueursEquipe();
            GridView1.DataBind();
            
        }
        else if (Request.Params["equipe"] == "no")
        {
            GridView1.Visible = false;
            GridView2.Visible = true;
            GridView2.DataSource = JoueurDAO.retournerListeJoueursSansEquipe();
            GridView2.DataBind();
        }

    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {

        Response.Redirect("Default.aspx?e=" + e.CommandSource);
    }
}
